#ifndef QBINARYRPC_RESPONSE_H
#define QBINARYRPC_RESPONSE_H

#include "qvariant.h"

namespace qbinaryrpc {
class Response {
public:
  Response();
  Response(int, const QVariant &);
  Response(int, int, const QString &);
  bool isNull() const;
  bool isFault() const;
  int getId() const;
  int getFaultCode() const;
  QString getFaultString() const;
  QVariant getReturnValue() const;
  bool setContent(const QByteArray &, int &);
  QByteArray composeResponse() const;
private:
  int id;
  bool is_null;
  bool is_fault;
  int fault_code;
  QString fault_string;
  QVariant return_value;
};

} //namespace qbinaryrpc
#endif //QBINARYRPC_RESPONSE_H
